package com.heisenhub.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.heisenhub.common.db.model.IsDel;
import com.heisnenhub.common.module.entity.IBaseEntity;
import com.heisnenhub.common.module.utils.TimeUtils;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * <p>
 * 部门表
 * </p>
 *
 * @author sen
 * @since 2023-12-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("dept")
public class Dept extends IsDel implements IBaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 部门ID
     */
    @TableId(value = "ID", type = IdType.AUTO)
    private Long id;

    /**
     * 上级部门ID
     */
    @TableField("PARENT_ID")
    private Long parentId;

    /**
     * 部门名称
     */
    @TableField("DEPT_NAME")
    private String deptName;

    /**
     * 排序
     */
    @TableField("ORDER_NUM")
    private Double orderNum;

    /**
     * 创建时间
     */
    @TableField("CREATE_TIME")
    @JsonFormat(pattern = TimeUtils.YMD_HMS,timezone = "GMT+8")
    private Date createTime;

    /**
     * 修改时间
     */
    @TableField("MODIFY_TIME")
    @JsonFormat(pattern = TimeUtils.YMD_HMS,timezone = "GMT+8")
    private Date modifyTime;


    public static final String ID = "id";

    public static final String PARENT_ID = "PARENT_ID";

    public static final String DEPT_NAME = "DEPT_NAME";

    public static final String ORDER_NUM = "ORDER_NUM";

    public static final String CREATE_TIME = "CREATE_TIME";

    public static final String MODIFY_TIME = "MODIFY_TIME";

}
